package com.changzhi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.changzhi.ldyl.model.UserGift;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 用户礼物表 Mapper 接口
 * </p>
 *
 * @author Alfred
 * @since 2019-11-19
 */
public interface UserGiftMapper extends BaseMapper<UserGift> {

	List<UserGift> selectGroupByUserId(@Param("startDateStr") String startDateStr,@Param("endDateStr")  String endDateStr);

	List<Long> selectGroupByFirst(@Param("startDateStr") String startDateStr,@Param("endDateStr")  String endDateStr);

	List<Long> selectGroupByFirstChannel(@Param("startDateStr") String startDateStr,@Param("endDateStr")  String endDateStr);

	Long selectValueSum(@Param("localDate") LocalDate localDate, @Param("now") LocalDateTime now);

	Integer userChannelTreasure(@Param("channelId") String channelId, @Param("userId") String userId,@Param("endTimeStr")String endTimeStr);
}
